package cn.good.yan.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * 服务端1  接口
 * <p>
 * 请求接口：http://localhost:9001/prov/test1
 *
 * @author shengren.yan
 * @create 2024-01-09
 */
@RestController
@RequestMapping("/prov")
@Slf4j
public class Test1Controller {


    @Value("${server.port}")
    private String serverPort;

    @Value("${name}")
    private String name;

    // 访问：服务端1 ， 接口
    @GetMapping(value = "/test1")
    public String test1() {
        System.out.println("请求成功" + serverPort + name);
        return "ok" + serverPort;
    }

}
